import { service } from "../request"

// 获取服务器的版本信息
export const getAppver = () => service.get('/appver')

//登录日志
export const getLoginLog = (params) => service.get('/manage/systemLogininfor', {
    params: params
})

//操作日志
export const getOperLog = (params) => service.get('/manage/systemOperLog', {
    params: params
})

//用户列表
export const getUserList = (params) => service.get('/manage/user', {
    params: params
})

//扫码记录*************************************************************
export const getUserScan = (userId) => service.get(`/manage/userScan`)

//储值开台记录
export const getUorder = (params) => service.get(`/manage/userOrder/uorder`, {
    params: params
})

//教练列表
export const getCoachPerson = (params) => service.get(`/manage/coachPerson`, {
    params: params
})

//新增教练
export const addCoach = (data) => service.post(`/manage/coachPerson/addcoach`, data)

//编辑教练
export const editCoach = (data) => service.post(`/manage/coachPerson/updatecoach`, data)

//删除教练
export const delCoach = (id) => service.post(`/manage/coachPerson/del/${id}`)

//合作意向
export const getCooperation = (params) => service.get('/manage/cooperation', {
    params: params
})

//投诉反馈
export const getFeedback = (params) => service.get('/manage/feedback', {
    params: params
})

//门店列表
export const getStoreList = (params) => service.get('/manage/store', {
    params: params
})

//添加门店
export const addStore = (data) => service.post('/manage/store/addStore', data)

//banner列表
export const getActive = (params) => service.get('/manage/activity', {
    params: params
})

//添加banner
export const addActive = (data) => service.post('/manage/activity/add', data)

//删除活动
export const delActive = (id) => service.post(`/manage/activity/del/${id}`)


//上传图片
export const uploadFile = (data) => service.post(`/manage/upfile/upload`, data, { headers: { 'Content-Type': 'multipart/form-data' } })

//积分商城列表
export const getMallList = (params) => service.get('/manage/integralMall', {
    params: params
})

//添加商品
export const addMall = (data) => service.post('/manage/integralMall/addmall', data)

//编辑商品
export const editMall = (data) => service.post(`/manage/integralMall/updatemall`, data)

//删除商品
export const delMall = (id) => service.post(`/manage/integralMall/del/${id}`)

//私教课列表
export const getCoachCourseList = (params) => service.get('/manage/personalTrainersUserRel', {
    params: params
})


//团体课列表
export const getGroupCourseList = (params) => service.get('/manage/coursePaike', {
    params: params
})


//团体课详情
export const getCourseDetail = (id) => service.get(`/manage/coursePaike/${id}`)

//添加团体课
export const addCourse = (data) => service.post('/manage/coursePaike', data)

//修改团体课
export const editCourse = (id,data) => service.post(`/manage/coursePaike/${id}/edit`, data)

//删除团体课
export const delCourse = (id) => service.post(`/manage/coursePaike/${id}`)










 
export const login = (data) => service.post('/manage/account/login', data)